<template>
  <b-row>
    <b-col cols="12" md="4" sm="12" order="2" order-md="1">
      <div>
        <sides />
      </div>
    </b-col>
    <b-col cols="12" md="8" sm="12" order="1" order-md="2">
      <b-card>
        <b-card-body>
          <b-img v-for="(img,index) in photos.photos" :key="index" :src="img" style="width: 150px;height:110px;margin: 10px"/>
        </b-card-body>
      </b-card>
    </b-col>
  </b-row>
</template>

<script>
import { getEditData } from '@/api/photoConfig/index'
import sides from '@/components/sides'

export default {
  name: 'Index',
  components: {
    sides
  },
  data() {
    return {
      photos: {},
      id: this.$route.query.id
    }
  },
  watch: {
    '$route.query.id'(v) {
      this.id = v
      this.init()
    }
  },
  created() {
    this.init()
  },
  methods: {
    init() {
      getEditData(this.id).then(r => {
        const { data } = r
        this.photos = data
      })
    }
  }
}
</script>

<style scoped>

</style>
